11. Putting It All Together: Case Studies in Feature Engineering for Trading Models
Prdtm2-785 Ai Trading C2 L3 Vid7 Piat-Case-Studies-In-Feature-Engineering-For-Trading-Models 1
Pre-processing Data for Trading Models
Understanding Pre-processing:
- Critical Step: Pre-processing data ensures it is in the right form.
- Two Methods: Batch vs. Stream Processing.
- Batch Processing: Efficient for predefined data chunks; ideal for personal trading models.
- Stream Processing: Complex, real-time; essential for high-frequency trading.
Data Collection:
- Gather reliable data from sources like Yahoo Finance or Alpha Vantage.
- Use historical data to capture varying market conditions.
- Include additional indicators (e.g., trading volumes, financial statements) for context.
Data Cleaning:
- Remove missing values and outliers.
- Choose the timeframe based on trading strategy (e.g., daily for long-term).
Feature Engineering:
- Objective: Create "up" or "down" signals for stock predictions.
- Generate features such as:
- Daily Returns: Percentage change in daily prices.
- Moving Averages: Short-term (10 days) vs. long-term (50 days) for trend signals.
- RSI: Indicator for overbought or oversold conditions.
- Trading Volume: Assess the strength of movements.
- Volatility: Identify potential trend changes.
- Lagged Returns: Use past returns to forecast future prices.
Equip yourself with these insights to effectively build machine learning trading models.